package model.dao;
import java.sql.*;
public class ConnectDb {
	public Connection doConnect(){
		Connection con=null;
		try{
			Class.forName("oracle.jdbc.OracleDriver");
			String url="jdbc:oracle:thin:@localhost:1521:xe";
			con=DriverManager.getConnection(url,"scott","tiger");
			
		}
		catch(ClassNotFoundException e){
			System.out.println(e.getMessage());
		}
		catch(SQLException ex){
		System.out.println(ex.getMessage());
		}
		if(con==null){
			System.out.println("Connection couldnt be created");
		}
		return con;
	}
}
